﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Master.Master"
    Inherits="System.Web.Mvc.ViewPage<ProductViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="quick">
        <% Html.RenderPartial("StepByStep"); %>
    </div>
    <form method="post" action="">
    <table class="gv">
        <tr>
            <td class="width100">
                价格:
            </td>
            <td>
                <%= Html.TextBox("Price",Model.ProductView.Price) %>
            </td>
        </tr>
        <tr>
            <td>
                折扣价:
            </td>
            <td>
                <%= Html.TextBox("discount",(Model.ProductView.Price * Model.ProductView.DisCount).ToString("0.00")) %>
            </td>
        </tr>
        <% foreach (UserLevelEntity item in Model.MemberDiscount)
           {
        %>
        <tr>
            <td>
                <%= Html.Hidden("LevelId",item.LevelId) %>
                <%= item.Name %>
            </td>
            <td>
                <%= Html.TextBox("MemberDiscount",(item.Discount*Model.ProductView.Price).ToString("0.00")) %>
                <label>
                    <%= Html.CheckBox("IsDiscount",item.IsDiscount) %>
                    参与打折</label>
            </td>
        </tr>
        <%
            }
        %>
        <tr>
            <td>
                操作:
            </td>
            <td>
                <input type="submit" value="保存" />
            </td>
        </tr>
    </table>
    </form>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cssLink" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="jsLink" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cssContent" runat="server">
    <script type="text/javascript">
        $(function () {
            $("form").submit(function () {
                $(":checked").each(function () {
                    $(this).parent().find(":hidden").val($(this).attr("checked"));
                    $(this).attr("disabled", true);
                });
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="jsContent" runat="server">
</asp:Content>
